package com.etc.datedemo;

import java.util.Calendar;

/**
 * @author: knowno
 * @create: 2024-09-09 15:43
 * @Version 1.0
 **/
public class TestCalendar {
    public static void main(String[] args) {
        Calendar instance = Calendar.getInstance();
        //java.util.GregorianCalendar[time=1725867810653,areFieldsSet=true,areAllFieldsSet=true,
        // lenient=true,zone=sun.util.calendar.ZoneInfo[id="Asia/Shanghai",offset=28800000,
        // dstSavings=0,useDaylight=false,transitions=19,lastRule=null],firstDayOfWeek=1,
        // minimalDaysInFirstWeek=1,ERA=1,YEAR=2024,MONTH=8,WEEK_OF_YEAR=37,WEEK_OF_MONTH=2,
        // DAY_OF_MONTH=9,DAY_OF_YEAR=253,DAY_OF_WEEK=2,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,
        // HOUR=3,HOUR_OF_DAY=15,MINUTE=43,SECOND=30,MILLISECOND=653,
        // ZONE_OFFSET=28800000,DST_OFFSET=0]
        System.out.println(instance);

        System.out.println(instance.get(Calendar.YEAR));
        System.out.println(instance.get(Calendar.DAY_OF_YEAR));
    }
}
